
$(function(){
	
	$('.driverDatabaseTypeChangeEvent').change(function(){
		var type = $(this).val();
		var url = $(this).parent().parent().next().find("textarea[name='url']");
		changeDriverDataBaseUrl(type, url);
	});
	
});

//数据库驱动与URL模板联动切换
function changeDriverDataBaseUrl(type, url){
	if(type=="com.mysql.jdbc.Driver"){
		url.val('jdbc:mysql://127.0.0.1:3306/test?seUnicode=true&characterEncoding=UTF8&amp;&useSSL=true');
	}else if(type=="oracle.jdbc.OracleDriver"){
		url.val('jdbc:oracle:thin:@127.0.0.1:1521:ORCL');
	}
}